
#ifndef _MEMBER_BANIMATION_H_
#define _MEMBER_BANIMATION_H_

#include <BAnimation>
#include <BChannel>

#define animation_member(animation)	((member_BAnimation*)((BAnimation*)animation)->_ptr)

namespace BWE
{
	class BWidget;

	class member_BAnimation
	{
	public:
		member_BAnimation(BAnimation* animation);
		~member_BAnimation();

		void attach(BObject* object);
		void detach();

		void linkChannel(BChannel* channel);
		void linkChannels();
		void unlinkChannels();

		BObject* findObject(const BString& name);

		BAnimation*				boss;
		BNode*					hostNode;
		BWidget*				hostWidget;
		bool					loop;
		float					duration;
		bool					pause;
		float					time;
		float					timeStart;
		float					timePause;
		BChannelHolderArray		channels;
	};
}

#endif